import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login.vue'
import forget from '../views/forget.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home.vue'),
    children: [{
      path: '/user',
      name: 'user',
      component: () => import('../views/user.vue'),
    },
    {
      path: '/notice',
      name: 'notice',
      component: () => import('../views/notice.vue')
    },
    {
      path: '/resources',
      name: 'resources',
      component: () => import( '../views/resources.vue'),
    },
    {
      path: '/loophole',
      name: 'loophole',
      component: () => import( '../views/loophole.vue'),
    },
    ]
  },
  {
    path: '/forget',
    name: 'forget',
    component: forget
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/register.vue')
  },
  
]

const router = new VueRouter({
  routes
})

export default router
